{% load static %}
<!DOCTYPE html>
<html>
<head>

    <meta charset="UTF-8">
    <h1 class="text-center text-blue mb-5" style="font-weight: bold;">宋氏办事大厅</h1>

    <title>登录</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
    body {
        background-image: url("{% static 'images/img.png' %}");
        background-size: cover;
        background-repeat: no-repeat;
        background-attachment: fixed;
        background-position: center;
    }
    </style>
</head>
<body class="bg-light">
<div class="container mt-5" style="max-width: 400px;">
    <h3 class="mb-4">用户登录</h3>
    <form method="post">
        {% csrf_token %}
        <div class="mb-3">
            <label for="username" class="form-label">用户名</label>
            <input type="text" name="username" class="form-control" required>
        </div>
        <div class="mb-3">
            <label for="password" class="form-label">密码</label>
            <input type="password" name="password" class="form-control" required>
        </div>
        <button type="submit" class="btn btn-primary w-100">登录</button>
    </form>
    {% if error %}
        <div class="alert alert-danger mt-3">{{ error }}</div>
    {% endif %}
    <p class="mt-3 text-center"><a href="{% url 'register' %}">还没有账号？去注册</a></p>
</div>
</body>
</html>
